
from bottle import route, run, template

from config import logger
from syn import find_syn

import json


@route('/syn/<name>')
def index(name):
    res = json.dumps({"status": "OK", "res": list(find_syn(name))}, ensure_ascii=False)
    logger.info(str((name, res)))
    return res



run(host='10.0.0.115', port=8080)
